home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 8 / Mac Magazin and MacEasy Magazine CD - Issue 08.iso / Sharewarebibliothek / Utilities / Minimalist Clock 1.0 / src / apple.c next >
Text File  |  1994-12-07  |  1KB  |  69 lines

  1. /* ----------------------------------------------------------------------
  2. apple.c
  3. ---------------------------------------------------------------------- */
  4.  
  5. #include    "the_defines.h"
  6. #include    "the_globals.h"
  7. #include    "the_prototypes.h"
  8.  
  9. /* ----------------------------------------------------------------------
  10. DoMenuApple
  11. ---------------------------------------------------------------------- */
  12. void DoMenuApple(theItem)
  13. int theItem;
  14. {
  15.     switch (theItem)
  16.     {
  17.         case APPLE_ABOUT:
  18.             AppleAbout();
  19.             break;
  20.         default:
  21.             AppleDA(theItem);
  22.             break;
  23.     }
  24.     
  25. }
  26.  
  27. /* ----------------------------------------------------------------------
  28. AppleAbout
  29. ---------------------------------------------------------------------- */
  30. void AppleAbout()
  31. {
  32.     DialogPtr myDialog;
  33.     short    itemHit;
  34.     Boolean aboutDone = false;
  35.     Boolean modaling;
  36.  
  37.     myDialog = GetNewDialog(DLOG_ABOUT,0,(WindowPtr) -1);
  38.     if (myDialog)
  39.     {
  40.         do
  41.         {
  42.             ShowWindow(myDialog);
  43.             ModalDialog(NIL,&itemHit);
  44.             switch(itemHit)
  45.             {
  46.                 case DLOG_ABOUT_OK:
  47.                     aboutDone = true;
  48.                     break;
  49.             }
  50.         }
  51.         while (!aboutDone);
  52.         DisposeDialog(myDialog);
  53.     }
  54. }
  55.  
  56. /* ----------------------------------------------------------------------
  57. AppleDA
  58. ---------------------------------------------------------------------- */
  59. void AppleDA(theItem)
  60. int theItem;
  61. {
  62.     Str255    accName;
  63.     int        accNumber;
  64.  
  65.     GetItem(gAppleMenu,theItem,accName);
  66.     accNumber = OpenDeskAcc(accName);
  67.  
  68. }
  69.